<%= form_tag({}, :id => 'mainForm') do %>                    

		<table class="full">
			<thead>
				<tr>
					<th>
					<input class="checkbox select-all" type="checkbox" /></th>
					<th width="30%">Event</th>
		
					<th>Status</th>
					<th>Articles</th>
					<th>Controls</th>
					<th>Published</th>
				</tr>

			</thead>
			<tfoot>
				<tr>
					<td colspan="6">
					<div class="bulk-actions">
						<select name="dropdown_action" class="dropdown_action">
								<option value="non">Choose an action...</option>
								<option value="delete">Delete</option>
						</select>
						<input type="button" class="button" onclick="doSelectedAction('<%= url_for({:action => "delete_events"}) %>');" value="Apply to selected" />
					</div>
					
						
						<%= will_paginate(@events, :renderer => "PaginationListLinkRenderer") %>
			
					
		
					<!-- End .pagination -->
					<div class="clear">
					</div>
					</td>
				</tr>
			</tfoot>
			<tbody class="tooltip-enabled">
				<% @events.each do |event| %>
				<tr>
					<td>
						<% if true %>
								<input type="checkbox" class="checkbox" name="ids[<%= event.id %>]" />
						<% else %>
								<%= image_tag("icons/lock.png",
										:border=>0,
										:title => 'Locked' )
								%>
						<% end %>
					</td>
		
					<td>
						<% if true %>
								<h5><%= link_to event.title, url_for({:action => 'show', :id => event.id}), "original-title" => 'View Details' %></h5>
						<% else %>
								<%= event.title %>
						<% end %>
					</td>
					<td>
						<%= event.event_status.title if !event.event_status.nil?%>
					</td>
					<td>
						<%= event.articles_count %>
					</td>
					
					<td>
						<% if event.chairman_edit?(@user) %>					
					  
								<%= link_to image_tag("icons/edit.png",
												:border=>0,
												:title => 'Edit'),
												url_for({:action => 'edit', :id => event.id}),
												"original-title" => 'Edit' %>
								<span class="delete">
								<%= link_to image_tag("icons/delete.png",
												:border=>0,
												:title => 'Edit'),
												url_for({:action => 'destroy', :id => event.id}),
												"original-title" => 'Delete',
												:confirm => 'Are you want to delete this event !' %>
								</span>
								
								<%= link_to image_tag("icons/approving_16.png",
												:border=>0,
												:title => 'Approving this Article'),
												url_for({:controller => 'reporter_articles', :action => 'approving', :id => event.id}),
												"original-title" => 'Approving this Article',
												:confirm => 'Are you want to approving this article !' %>
						<% end %>									
						
					</td>
					
					<td align="center">
						<span id="published_<%= event.id %>" class="published">
						  <%=
							if event.published
						  link_to image_tag("published_on.png", :border=>0, :class => 'icon16 fl-space2'),										      
								  { :controller => "events", :id => event.id,										      
								  :action => "published", :format => "js"}, :title => 'Yes',
								  :remote => true
							else
						  link_to image_tag("published_off.png", :border=>0, :class => 'icon16 fl-space2', :title => 'No'),										      
								  { :controller => "events", :id => event.id,										      
								  :action => "published", :format => "js"}, :title => 'No',
								  :remote => true
							end
						  %>
						</span>									  
					</td>
				</tr>
				<% end %>
			</tbody>
		</table>
						  
<% end %>
